<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>代理授权证书</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="/css/all.css"/>
    <link rel="stylesheet" href="/css/list1.css"/>
    <script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/static/js/layer/layer.js"></script>
</head>
<body>
<div class="title">代理授权证书
    <div class="title_left"><a href="{{urlHome('index','getIndex')}}">返回</a></div>
</div>
@if(file_exists(public_path().'/upload/brand/'.session('agent')['bid'].'.png'))
    <div class="main">
        <button type="button" class="btn btn-info center-block" id="reganerate">重新生成</button>
        <img src="/upload/agent/{{session('agent')['aid'].'.png'}}" alt=""/>
    </div>
@else
    <p style="text-align: center;color: lightgray;margin-top: 200px;">该代理商暂无证书</p>
@endif
<script>
    $("#reganerate").click(function () {
        $.get("{{urlHome('agent','getGenerateBook')}}", function (res) {
            if (!res) {
                layer.msg('生成失败，请稍后再试！');
            } else {
                location.reload();
            }
        });
    });
</script>
</body>
</html>